<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="huoyun" uri="/huoyun"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>我的用户中心</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/theme/css/main.css">
		<link rel="stylesheet" type="text/css"
			href="${pageContext.request.contextPath}/theme/css/style_userCenter.css">

	<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/jquery.validate.js"></script>
	<script type="text/javascript" src="${pageContext.request.contextPath}/theme/js/additional-methods.js" charset="utf-8"></script>
  
  	<script type="text/javascript">
  		$(document).ready(function() {
  			$("#editAddressForm").validate({
  			rules : {
  				"address.postalCode":
  				{
  					zipCode: true
  				},
  				"address.mobilePhone":
  				{
  					required : true,
  					mobile: true
  				},
  				"address.telephone":
  				{
  					phone: true
  				}
  			},
  			
  			messages : {
  				"address.postalCode":
  				{
  					zipCode: "邮政编码格式错误"
  				},
  				"address.mobilePhone":
  				{
  					mobile: "电话号码格式错误"
  				},
  				"address.telephone":
  				{
  					phone: "请输入正确的手机号码"
  				}
  			}
  			})
  		});
  	</script>
	</head>
	<body>
		<div>
			<jsp:include page="../nav.jsp">
				<jsp:param value="nav_account" name="nav" />
			</jsp:include>
		</div>
		<div class="realCer">

			<!--主体部分-->
			<div class="realMain clearfix mt10">
				<!--左侧菜单-->
				<div class="realLeft" id="meunLeft">
					<jsp:include page="../leftMenu.jsp">
						<jsp:param value="con_nav_account" name="con_nav" />
						<jsp:param value="addressManagement" name="selectMenu"/>
					</jsp:include>
				</div>
				<!--中由-->
				<div class="realRight ml10">
					<div class="box">
						<div class="tit">
							修改邮寄地址
						</div>
						<div class="con">
							<div class="form_wrap clearfix">
								<div style="color: red; margin-left: 100px;">
									<s:property value="resultMsg" />
									<s:fielderror></s:fielderror>
								</div>
								<s:url var="editAddressUrl" action="editAddress.action"
									namespace="/address"></s:url>
								<form method="post" id="editAddressForm" name="editAddressForm"
									action="<s:property value="#editAddressUrl"/>">
									<table class="tableForm">
										<tbody>
											<tr>
												<td class="tdLabel">
													收货人姓名:
												</td>
												<td class="tdValue">
													<input class="text" type="text" name="address.username" value="<s:property value='address.username'/>"/>
												</td>
											</tr>
											<tr>
												<td class="tdLabel">
													所在区域:
												</td>
												<td class="tdValue">
													<huoyun:regionSelect provinceName="address.province"
														cityName="address.city" townName="address.town" 
														provinceValue="${address.province }" cityValue="${address.city }" townValue="${address.town }"/>
													</div>
												</td>
											</tr>

											<tr>
												<td class="tdLabel">
													详细地址:
												</td>
												<td class="tdValue">
													<input class="text" type="text" style="width: 313px;"
														name="address.address" id="address.address" value="<s:property value='address.address'/>"/>
												</td>
											</tr>
											<tr>
												<td class="tdLabel">
													邮政编码:
												</td>
												<td class="tdValue">
													<input type="text " name="address.postalCode"
														id="address.postalCode" class="text" value="<s:property value='address.postalCode'/>"/>
												</td>
											</tr>
											<tr>
												<td class="tdLabel">
													手机号码:
												</td>
												<td class="tdValue">
													<input type="text" name="address.mobilePhone"
														id="address.mobilePhone" class="text" value="<s:property value='address.mobilePhone'/>"/>
												</td>
											</tr>
											<tr>
												<td class="tdLabel">
													座机号码:
												</td>
												<td class="tdValue">
													<input type="text" name="address.telephone"
														id="address.telephone" class="text" value="<s:property value='address.telephone'/>"/>
												</td>
											</tr>
											<tr>
												<td></td>
												<td class="tdValue">
													<input type="submit" class="default_btn" value="保存">
												</td>
											</tr>
										</tbody>
									</table>
								</form>
							</div>
						</div>
					</div>
				</div>
				<!--中由-->
			</div>
		</div>
		<div>
			<jsp:include page="/footer.jsp"></jsp:include>
		</div>
	</body>
</html>
